﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel.Channels;

namespace suanpan.API.Components.Encoders
{
    public class JsonpMessageEncodingBindingElement : MessageEncodingBindingElement
    {
        
        public override IChannelListener<TChannel> BuildChannelListener<TChannel>(BindingContext context)
        {
            //??
            context.BindingParameters.Add(this);
            return base.BuildChannelListener<TChannel>(context);
        }

        public override MessageEncoderFactory CreateMessageEncoderFactory()
        {
            return new JsonpMessageEncoderFactory();
        }

        public override MessageVersion MessageVersion
        {
            get
            {
                return MessageVersion.None;
            }
            set
            {
                return;
            }
        }

        public override BindingElement Clone()
        {
            return new JsonpMessageEncodingBindingElement();
        }
    }


}
